package com.tools.listener;

import com.tools.commons.LogEvent;
import com.tools.commons.model.RequestInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author wangminggen
 */
@Slf4j
@Component
public class LogEventListener {
    @EventListener
    @Async
    public void onApplicationEvent(LogEvent event) {
        RequestInfo info = event.getInfo();
        // log.info("request {}", JsonUtil.obj2String(info));
    }
}
